home *** CD-ROM | disk | FTP | other *** search
/ This Disc Bytes! / Power Computing - The Disc 2 - This Disc Bytes.ISO / mac / CodeWarrior 7 Lite for 68K / MacOS Support / Headers / Universal Headers / Video.h < prev    next >
Text File  |  1995-07-06  |  23KB  |  560 lines

  1. /*
  2.      File:        Video.h
  3.  
  4.      Contains:    Video Driver Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __VIDEO__
  21. #define __VIDEO__
  22.  
  23.  
  24. #ifndef __QUICKDRAW__
  25. #include <Quickdraw.h>
  26. #endif
  27. /*    #include <Types.h>                                            */
  28. /*        #include <ConditionalMacros.h>                            */
  29. /*    #include <MixedMode.h>                                        */
  30. /*    #include <QuickdrawText.h>                                    */
  31.  
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35.  
  36. #if PRAGMA_ALIGN_SUPPORTED
  37. #pragma options align=mac68k
  38. #endif
  39.  
  40. #if PRAGMA_IMPORT_SUPPORTED
  41. #pragma import on
  42. #endif
  43.  
  44.  
  45. enum {
  46.     mBaseOffset                    = 1,                            /*Id of mBaseOffset.*/
  47.     mRowBytes                    = 2,                            /*Video sResource parameter Id's */
  48.     mBounds                        = 3,                            /*Video sResource parameter Id's */
  49.     mVersion                    = 4,                            /*Video sResource parameter Id's */
  50.     mHRes                        = 5,                            /*Video sResource parameter Id's */
  51.     mVRes                        = 6,                            /*Video sResource parameter Id's */
  52.     mPixelType                    = 7,                            /*Video sResource parameter Id's */
  53.     mPixelSize                    = 8,                            /*Video sResource parameter Id's */
  54.     mCmpCount                    = 9,                            /*Video sResource parameter Id's */
  55.     mCmpSize                    = 10,                            /*Video sResource parameter Id's */
  56.     mPlaneBytes                    = 11,                            /*Video sResource parameter Id's */
  57.     mVertRefRate                = 14,                            /*Video sResource parameter Id's */
  58.     mVidParams                    = 1,                            /*Video parameter block id.*/
  59.     mTable                        = 2,                            /*Offset to the table.*/
  60.     mPageCnt                    = 3,                            /*Number of pages*/
  61.     mDevType                    = 4,                            /*Device Type*/
  62.     oneBitMode                    = 128,                            /*Id of OneBitMode Parameter list.*/
  63.     twoBitMode                    = 129,                            /*Id of TwoBitMode Parameter list.*/
  64.     fourBitMode                    = 130,                            /*Id of FourBitMode Parameter list.*/
  65.     eightBitMode                = 131                            /*Id of EightBitMode Parameter list.*/
  66. };
  67.  
  68. enum {
  69.     sixteenBitMode                = 132,                            /*Id of SixteenBitMode Parameter list.*/
  70.     thirtyTwoBitMode            = 133,                            /*Id of ThirtyTwoBitMode Parameter list.*/
  71.     firstVidMode                = 128,                            /*The new, better way to do the above. */
  72.     secondVidMode                = 129,                            /* QuickDraw only supports six video */
  73.     thirdVidMode                = 130,                            /* at this time.      */
  74.     fourthVidMode                = 131,
  75.     fifthVidMode                = 132,
  76.     sixthVidMode                = 133,
  77.     spGammaDir                    = 64,
  78.     spVidNamesDir                = 65
  79. };
  80.  
  81. /* csTimingFormat values in VDTimingInfo */
  82. /* look in the declaration rom for timing info */
  83. enum {
  84.     kDeclROMtables                = 'decl'
  85. };
  86.  
  87. /* Timing mode constants for Display Manager MultiMode support
  88.     Corresponding    .h equates are in Video.h
  89.                     .a equates are in Video.a
  90.                     .r equates are in DepVideoEqu.r
  91.     
  92.     The first enum is the old names (for compatibility).
  93.     The second enum is the new names.
  94. */
  95. enum {
  96.     timingApple12                = 130,                            /*  512x384 (60 Hz) Rubik timing.*/
  97.     timingApple12x                = 135,                            /*  560x384 (60 Hz) Rubik-560 timing.*/
  98.     timingApple13                = 140,                            /*  640x480 (67 Hz) HR timing.*/
  99.     timingApple13x                = 145,                            /*  640x400 (67 Hz) HR-400 timing.*/
  100.     timingAppleVGA                = 150,                            /*  640x480  (60 Hz) VGA timing.*/
  101.     timingApple15                = 160,                            /*  640x870 (75 Hz) FPD timing.*/
  102.     timingApple15x                = 165,                            /*  640x818 (75 Hz) FPD-818 timing.*/
  103.     timingApple16                = 170,                            /*  832x624 (75 Hz) GoldFish timing.*/
  104.     timingAppleSVGA                = 180,                            /*  800x600  (56 Hz) SVGA timing.*/
  105.     timingApple1Ka                = 190,                            /* 1024x768 (60 Hz) VESA 1K-60Hz timing.*/
  106.     timingApple1Kb                = 200,                            /* 1024x768 (70 Hz) VESA 1K-70Hz timing.*/
  107.     timingApple19                = 210,                            /* 1024x768  (75 Hz) Apple 19" RGB.*/
  108.     timingApple21                = 220                            /* 1152x870  (75 Hz) Apple 21" RGB.*/
  109. };
  110.  
  111. enum {
  112.     timingInvalid                = 0,                            /* Unknown timing… force user to confirm.*/
  113.     timingApple_512x384_60hz    = 130,                            /*  512x384  (60 Hz) Rubik timing.*/
  114.     timingApple_560x384_60hz    = 135,                            /*  560x384  (60 Hz) Rubik-560 timing.*/
  115.     timingApple_640x480_67hz    = 140,                            /*  640x480  (67 Hz) HR timing.*/
  116.     timingApple_640x400_67hz    = 145,                            /*  640x400  (67 Hz) HR-400 timing.*/
  117.     timingVESA_640x480_60hz        = 150,                            /*  640x480  (60 Hz) VGA timing.*/
  118.     timingApple_640x870_75hz    = 160,                            /*  640x870  (75 Hz) FPD timing.*/
  119.     timingApple_640x818_75hz    = 165,                            /*  640x818  (75 Hz) FPD-818 timing.*/
  120.     timingApple_832x624_75hz    = 170,                            /*  832x624  (75 Hz) GoldFish timing.*/
  121.     timingVESA_800x600_56hz        = 180,                            /*  800x600  (56 Hz) SVGA timing.*/
  122.     timingVESA_800x600_60hz        = 182,                            /*  800x600  (60 Hz) SVGA timing.*/
  123.     timingVESA_800x600_72hz        = 184,                            /*  800x600  (72 Hz) SVGA timing.*/
  124.     timingVESA_800x600_75hz        = 186,                            /*  800x600  (75 Hz) SVGA timing.*/
  125.     timingVESA_1024x768_60hz    = 190,                            /* 1024x768  (60 Hz) VESA 1K-60Hz timing.*/
  126.     timingVESA_1024x768_70hz    = 200,                            /* 1024x768  (70 Hz) VESA 1K-70Hz timing.*/
  127.     timingVESA_1024x768_75hz    = 204,                            /* 1024x768  (75 Hz) VESA 1K-70Hz timing (very similar to timingApple_1024x768_75hz).*/
  128.     timingApple_1024x768_75hz    = 210,                            /* 1024x768  (75 Hz) Apple 19" RGB.*/
  129.     timingApple_1152x870_75hz    = 220,                            /* 1152x870  (75 Hz) Apple 21" RGB.*/
  130.     timingAppleNTSC_ST            = 230,                            /*  512x384  (60 Hz, interlaced, non-convolved).*/
  131.     timingAppleNTSC_FF            = 232,                            /*  640x480  (60 Hz, interlaced, non-convolved).*/
  132.     timingAppleNTSC_STconv        = 234,                            /*  512x384  (60 Hz, interlaced, convolved).*/
  133.     timingAppleNTSC_FFconv        = 236,                            /*  640x480  (60 Hz, interlaced, convolved).*/
  134.     timingApplePAL_ST            = 238,                            /*  640x480  (50 Hz, interlaced, non-convolved).*/
  135.     timingApplePAL_FF            = 240,                            /*  768x576  (50 Hz, interlaced, non-convolved).*/
  136.     timingApplePAL_STconv        = 242,                            /*  640x480  (50 Hz, interlaced, convolved).*/
  137.     timingApplePAL_FFconv        = 244,                            /*  768x576  (50 Hz, interlaced, convolved).*/
  138.     timingVESA_1280x960_75hz    = 250,                            /* 1280x960  (75 Hz)*/
  139.     timingVESA_1280x1024_60hz    = 260,                            /* 1280x1024 (60 Hz)*/
  140.     timingVESA_1280x1024_75hz    = 262,                            /* 1280x1024 (75 Hz)*/
  141.     timingVESA_1600x1200_60hz    = 280,                            /* 1600x1200 (60 Hz) VESA proposed timing.*/
  142.     timingVESA_1600x1200_65hz    = 282,                            /* 1600x1200 (65 Hz) VESA proposed timing.*/
  143.     timingVESA_1600x1200_70hz    = 284,                            /* 1600x1200 (70 Hz) VESA proposed timing.*/
  144.     timingVESA_1600x1200_75hz    = 286,                            /* 1600x1200 (75 Hz) VESA proposed timing.*/
  145.     timingVESA_1600x1200_80hz    = 288                            /* 1600x1200 (80 Hz) VESA proposed timing (pixel clock is 216 Mhz dot clock).*/
  146. };
  147.  
  148. /* csConnectFlags values in VDDisplayConnectInfo */
  149. enum {
  150.     kAllModesValid                = 0,                            /* All modes not trimmed by primary init are good close enough to try */
  151.     kAllModesSafe                = 1,                            /* All modes not trimmed by primary init are know to be safe */
  152.     kReportsTagging                = 2,                            /* Can detect tagged displays (to identify smart monitors) */
  153.     kHasDirectConnection        = 3,                            /* True implies that driver can talk directly to device (e.g. serial data link via sense lines) */
  154.     kIsMonoDev                    = 4,                            /* Says whether there’s an RGB (0) or Monochrome (1) connection. */
  155.     kUncertainConnection        = 5,                            /* There may not be a display (no sense lines?). */
  156.     kTaggingInfoNonStandard        = 6,                            /* Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). */
  157.     kReportsDDCConnection        = 7,                            /* Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). */
  158.     kHasDDCConnection            = 8                                /* Card has ddc connect now. */
  159. };
  160.  
  161. /* csDisplayType values in VDDisplayConnectInfo */
  162. enum {
  163.     kUnknownConnect                = 1,                            /* Not sure how we’ll use this, but seems like a good idea. */
  164.     kPanelConnect                = 2,                            /* For use with fixed-in-place LCD panels. */
  165.     kPanelTFTConnect            = 2,                            /* Alias for kPanelConnect */
  166.     kFixedModeCRTConnect        = 3,                            /*  For use with fixed-mode (i.e., very limited range) displays. */
  167.     kMultiModeCRT1Connect        = 4,                            /* 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe */
  168.     kMultiModeCRT2Connect        = 5,                            /* 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe */
  169.     kMultiModeCRT3Connect        = 6,                            /* 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain */
  170.     kMultiModeCRT4Connect        = 7,                            /* Expansion to large multi mode (not yet used) */
  171.     kModelessConnect            = 8,                            /* Expansion to modeless model (not yet used) */
  172.     kFullPageConnect            = 9,                            /* 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) */
  173.     kVGAConnect                    = 10,                            /* 640x480 VGA default -- question everything else */
  174.     kNTSCConnect                = 11,                            /* NTSC ST (default), FF, STconv, FFconv */
  175.     kPALConnect                    = 12,                            /* PAL ST (default), FF, STconv, FFconv */
  176.     kHRConnect                    = 13,                            /* Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only) */
  177.     kPanelFSTNConnect            = 14,                            /* For use with fixed-in-place LCD FSTN (aka “Supertwist”) panels */
  178.     kMonoTwoPageConnect            = 15,                            /* 1152x870 Apple color two-page display */
  179.     kColorTwoPageConnect        = 16,                            /* 1152x870 Apple B&W two-page display */
  180.     kColor16Connect                = 17,                            /* 832x624 Apple B&W two-page display */
  181.     kColor19Connect                = 18                            /* 1024x768 Apple B&W two-page display */
  182. };
  183.  
  184. /* csTimingFlags values in VDTimingInfoRec */
  185. enum {
  186.     kModeValid                    = 0,                            /* Says that this mode should NOT be trimmed. */
  187.     kModeSafe                    = 1,                            /* This mode does not need confirmation */
  188.     kModeDefault                = 2,                            /* This is the default mode for this type of connection */
  189.     kModeShowNow                = 3,                            /* This mode should always be shown (even though it may require a confirm) */
  190.     kModeNotResize                = 4,                            /* This mode should not be used to resize the display (eg. mode selects a different connector on card) */
  191.     kModeRequiresPan            = 5                                /* This mode has more pixels than are actually displayed */
  192. };
  193.  
  194. /* csResolutionFlags bit flags for VDResolutionInfoRec */
  195. enum {
  196.     kResolutionHasMultipleDepthSizes = 0                        /* Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths) */
  197. };
  198.  
  199. enum {
  200. /*    Power Mode constants for VDPowerStateRec.powerState.    */
  201.     kAVPowerOff,
  202.     kAVPowerStandby,
  203.     kAVPowerSuspend,
  204.     kAVPowerOn
  205. };
  206.  
  207. enum {
  208. /*    Power Mode masks and bits for VDPowerStateRec.powerFlags.    */
  209.     kPowerStateNeedsRefresh        = 0,
  210.     kPowerStateNeedsRefreshMask    = (1L << 0)
  211. };
  212.  
  213. enum {
  214. /* Control Codes */
  215.     cscReset                    = 0,
  216.     cscKillIO                    = 1,
  217.     cscSetMode                    = 2,
  218.     cscSetEntries                = 3,
  219.     cscSetGamma                    = 4,
  220.     cscGrayPage                    = 5,
  221.     cscGrayScreen                = 5,
  222.     cscSetGray                    = 6,
  223.     cscSetInterrupt                = 7,
  224.     cscDirectSetEntries            = 8,
  225.     cscSetDefaultMode            = 9,
  226.     cscSwitchMode                = 10,
  227.     cscSetSync                    = 11,
  228.     cscUnusedCall                = 127                            /* This call used to expend the scrn resource.  Its imbedded data contains more control info */
  229. };
  230.  
  231. enum {
  232. /* Status Codes */
  233.     cscGetMode                    = 2,
  234.     cscGetEntries                = 3,
  235.     cscGetPageCnt                = 4,
  236.     cscGetPages                    = 4,                            /* This is what C&D 2 calls it. */
  237.     cscGetPageBase                = 5,
  238.     cscGetBaseAddr                = 5,                            /* This is what C&D 2 calls it. */
  239.     cscGetGray                    = 6,
  240.     cscGetInterrupt                = 7,
  241.     cscGetGamma                    = 8,
  242.     cscGetDefaultMode            = 9,
  243.     cscGetCurMode                = 10,
  244.     cscGetSync                    = 11,
  245.     cscGetConnection            = 12,                            /* Return information about the connection to the display */
  246.     cscGetModeTiming            = 13,                            /* Return timing info for a mode */
  247.     cscGetModeBaseAddress        = 14,                            /* Return base address information about a particular mode */
  248.     cscGetScanProc                = 15                            /* QuickTime scan chasing routine */
  249. };
  250.  
  251. /* Bit definitions for the Get/Set Sync call*/
  252. enum {
  253.     kDisableHorizontalSyncBit    = 0,
  254.     kDisableVerticalSyncBit        = 1,
  255.     kDisableCompositeSyncBit    = 2,
  256.     kEnableSyncOnBlue            = 3,
  257.     kEnableSyncOnGreen            = 4,
  258.     kEnableSyncOnRed            = 5,
  259.     kNoSeparateSyncControlBit    = 6,
  260.     kHorizontalSyncMask            = 0x01,
  261.     kVerticalSyncMask            = 0x02,
  262.     kCompositeSyncMask            = 0x04,
  263.     kDPMSSyncMask                = 0x7,
  264.     kSyncOnBlueMask                = 0x08,
  265.     kSyncOnGreenMask            = 0x10,
  266.     kSyncOnRedMask                = 0x20,
  267.     kSyncOnMask                    = 0x38
  268. };
  269.  
  270. enum {
  271. /*    Power Mode constants for translating DPMS modes to Get/SetSync calls.    */
  272.     kDPMSSyncOn                    = 0,
  273.     kDPMSSyncStandby            = 1,
  274.     kDPMSSyncSuspend            = 2,
  275.     kDPMSSyncOff                = 7
  276. };
  277.  
  278. struct VPBlock {
  279.     long                            vpBaseOffset;                /*Offset to page zero of video RAM (From minorBaseOS).*/
  280.     short                            vpRowBytes;                    /*Width of each row of video memory.*/
  281.     Rect                            vpBounds;                    /*BoundsRect for the video display (gives dimensions).*/
  282.     short                            vpVersion;                    /*PixelMap version number.*/
  283.     short                            vpPackType;
  284.     long                            vpPackSize;
  285.     long                            vpHRes;                        /*Horizontal resolution of the device (pixels per inch).*/
  286.     long                            vpVRes;                        /*Vertical resolution of the device (pixels per inch).*/
  287.     short                            vpPixelType;                /*Defines the pixel type.*/
  288.     short                            vpPixelSize;                /*Number of bits in pixel.*/
  289.     short                            vpCmpCount;                    /*Number of components in pixel.*/
  290.     short                            vpCmpSize;                    /*Number of bits per component*/
  291.     long                            vpPlaneBytes;                /*Offset from one plane to the next.*/
  292. };
  293. typedef struct VPBlock VPBlock;
  294.  
  295. typedef VPBlock *VPBlockPtr;
  296.  
  297. struct VDEntryRecord {
  298.     Ptr                                csTable;                    /*(long) pointer to color table entry=value, r,g,b:INTEGER*/
  299. };
  300. typedef struct VDEntryRecord VDEntryRecord;
  301.  
  302. typedef VDEntryRecord *VDEntRecPtr;
  303.  
  304. /* Parm block for SetGray control call */
  305. struct VDGrayRecord {
  306.     Boolean                            csMode;                        /*Same as GDDevType value (0=color, 1=mono)*/
  307.     SInt8                            filler;
  308. };
  309. typedef struct VDGrayRecord VDGrayRecord;
  310.  
  311. typedef VDGrayRecord *VDGrayPtr;
  312.  
  313. /* Parm block for SetInterrupt call */
  314. struct VDFlagRecord {
  315.     SInt8                            csMode;
  316.     SInt8                            filler;
  317. };
  318. typedef struct VDFlagRecord VDFlagRecord;
  319.  
  320. typedef VDFlagRecord *VDFlagRecPtr;
  321.  
  322. /* Parm block for SetEntries control call */
  323. struct VDSetEntryRecord {
  324.     ColorSpec                        *csTable;                    /*Pointer to an array of color specs*/
  325.     short                            csStart;                    /*Which spec in array to start with, or -1*/
  326.     short                            csCount;                    /*Number of color spec entries to set*/
  327. };
  328. typedef struct VDSetEntryRecord VDSetEntryRecord;
  329.  
  330. typedef VDSetEntryRecord *VDSetEntryPtr;
  331.  
  332. /* Parm block for SetGamma control call */
  333. struct VDGammaRecord {
  334.     Ptr                                csGTable;                    /*pointer to gamma table*/
  335. };
  336. typedef struct VDGammaRecord VDGammaRecord;
  337.  
  338. typedef VDGammaRecord *VDGamRecPtr;
  339.  
  340. struct VDBaseAddressInfoRec {
  341.     long                            csDevData;                    /* LONGINT - (long) timing mode */
  342.     long                            csDevBase;                    /* LONGINT - (long) base address of the mode */
  343.     short                            csModeReserved;                /* INTEGER - (short) will some day be the depth */
  344.     long                            csModeBase;                    /* LONGINT - (long) reserved */
  345. };
  346. typedef struct VDBaseAddressInfoRec VDBaseAddressInfoRec, *VDBaseAddressInfoPtr;
  347.  
  348. struct VDSwitchInfoRec {
  349.     unsigned short                    csMode;                        /*(word) mode depth*/
  350.     unsigned long                    csData;                        /*(long) functional sResource of mode*/
  351.     unsigned short                    csPage;                        /*(word) page to switch in*/
  352.     Ptr                                csBaseAddr;                    /*(long) base address of page (return value)*/
  353.     unsigned long                    csReserved;                    /*(long) Reserved (set to 0) */
  354. };
  355. typedef struct VDSwitchInfoRec VDSwitchInfoRec;
  356.  
  357. typedef VDSwitchInfoRec *VDSwitchInfoPtr;
  358.  
  359. struct VDTimingInfoRec {
  360.     unsigned long                    csTimingMode;                /* LONGINT - (long) timing mode (a la InitGDevice) */
  361.     unsigned long                    csTimingReserved;            /* LONGINT - (long) reserved */
  362.     unsigned long                    csTimingFormat;                /* LONGINT - (long) what format is the timing info */
  363.     unsigned long                    csTimingData;                /* LONGINT - (long) data supplied by driver */
  364.     unsigned long                    csTimingFlags;                /* LONGINT - (long) mode within device */
  365. };
  366. typedef struct VDTimingInfoRec VDTimingInfoRec;
  367.  
  368. typedef VDTimingInfoRec *VDTimingInfoPtr;
  369.  
  370. struct VDDisplayConnectInfoRec {
  371.     unsigned short                    csDisplayType;                /* INTEGER - (word) Type of display connected */
  372.     unsigned char                    csConnectTaggedType;        /* BYTE - type of tagging */
  373.     unsigned char                    csConnectTaggedData;        /* BYTE - tagging data */
  374.     unsigned long                    csConnectFlags;                /* LONGINT - (long) tell us about the connection */
  375.     unsigned long                    csDisplayComponent;            /* LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) */
  376.     unsigned long                    csConnectReserved;            /* LONGINT - (long) reserved */
  377. };
  378. typedef struct VDDisplayConnectInfoRec VDDisplayConnectInfoRec;
  379.  
  380. typedef VDDisplayConnectInfoRec *VDDisplayConnectInfoPtr;
  381.  
  382. /* RawSenseCode
  383.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  384.     for the possible raw sense code values when 'standard' sense code hardware is implemented.
  385.  
  386.     For 'standard' sense code hardware, the raw sense is obtained as follows:
  387.         • Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
  388.         • Read the state of the monitor sense lines 2, 1, and 0.  (2 is the MSB, 0 the LSB)
  389.  
  390.     IMPORTANT Note: 
  391.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  392.     are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' 
  393.  
  394. */
  395. typedef unsigned char RawSenseCode;
  396.  
  397.  
  398. enum {
  399.     kRSCZero                    = 0,
  400.     kRSCOne                        = 1,
  401.     kRSCTwo                        = 2,
  402.     kRSCThree                    = 3,
  403.     kRSCFour                    = 4,
  404.     kRSCFive                    = 5,
  405.     kRSCSix                        = 6,
  406.     kRSCSeven                    = 7
  407. };
  408.  
  409. /* ExtendedSenseCode
  410.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  411.     for the values which are possible when the extended sense algorithm is applied to hardware
  412.     which implements 'standard' sense code hardware.
  413.  
  414.      For 'standard' sense code hardware, the extended sense code algorithm is as follows:
  415.     (Note:  as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
  416.         • Drive sense line 'A' low and read the values of 'B' and 'C'.  
  417.         • Drive sense line 'B' low and read the values of 'A' and 'C'.
  418.         • Drive sense line 'C' low and read the values of 'A' and 'B'.
  419.  
  420.     In this way, a six-bit number of the form BC/AC/AB is generated. 
  421.  
  422.     IMPORTANT Note: 
  423.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  424.     are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' 
  425.  
  426. */
  427. typedef unsigned char ExtendedSenseCode;
  428.  
  429.  
  430. enum {
  431.     kESCZero21Inch                = 0x00,                            /* 21" RGB                                 */
  432.     kESCOnePortraitMono            = 0x14,                            /* Portrait Monochrome                     */
  433.     kESCTwo12Inch                = 0x21,                            /* 12" RGB                                */
  434.     kESCThree21InchRadius        = 0x31,                            /* 21" RGB (Radius)                        */
  435.     kESCThree21InchMonoRadius    = 0x34,                            /* 21" Monochrome (Radius)                 */
  436.     kESCThree21InchMono            = 0x35,                            /* 21" Monochrome                        */
  437.     kESCFourNTSC                = 0x0A,                            /* NTSC                                 */
  438.     kESCFivePortrait            = 0x1E,                            /* Portrait RGB                         */
  439.     kESCSixMSB1                    = 0x03,                            /* MultiScan Band-1 (12" thru 1Six")    */
  440.     kESCSixMSB2                    = 0x0B,                            /* MultiScan Band-2 (13" thru 19")        */
  441.     kESCSixMSB3                    = 0x23,                            /* MultiScan Band-3 (13" thru 21")        */
  442.     kESCSixStandard                = 0x2B,                            /* 13"/14" RGB or 12" Monochrome        */
  443.     kESCSevenPAL                = 0x00,                            /* PAL                                    */
  444.     kESCSevenNTSC                = 0x14,                            /* NTSC                                 */
  445.     kESCSevenVGA                = 0x17,                            /* VGA                                     */
  446.     kESCSeven16Inch                = 0x2D,                            /* 16" RGB (GoldFish)                      */
  447.     kESCSevenPALAlternate        = 0x30,                            /* PAL (Alternate)                         */
  448.     kESCSeven19Inch                = 0x3A,                            /* Third-Party 19”                        */
  449.     kESCSevenNoDisplay            = 0x3F                            /* No display connected                 */
  450. };
  451.  
  452. /* DepthMode
  453.     This abstract data type is used to to reference RELATIVE pixel depths.
  454.     Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
  455.  
  456.     Bits per pixel DOES NOT directly map to 'DepthMode'  For example, on some
  457.     graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
  458.     hardware, 'kDepthMode1' may represent 8BPP.
  459.  
  460.     DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
  461.     behave as expected.  The values of the constants which comprise the set are such
  462.     that 'kDepthMode4 < kDepthMode6' behaves as expected.
  463. */
  464. typedef unsigned short DepthMode;
  465.  
  466.  
  467. enum {
  468.     kDepthMode1                    = 128,
  469.     kDepthMode2                    = 129,
  470.     kDepthMode3                    = 130,
  471.     kDepthMode4                    = 131,
  472.     kDepthMode5                    = 132,
  473.     kDepthMode6                    = 133
  474. };
  475.  
  476. enum {
  477.     kFirstDepthMode                = 128,                            /* These constants are obsolete, and just included    */
  478.     kSecondDepthMode            = 129,                            /* for clients that have converted to the above        */
  479.     kThirdDepthMode                = 130,                            /* kDepthModeXXX constants.                            */
  480.     kFourthDepthMode            = 131,
  481.     kFifthDepthMode                = 132,
  482.     kSixthDepthMode                = 133
  483. };
  484.  
  485. struct VDPageInfo {
  486.     short                            csMode;                        /*(word) mode within device*/
  487.     long                            csData;                        /*(long) data supplied by driver*/
  488.     short                            csPage;                        /*(word) page to switch in*/
  489.     Ptr                                csBaseAddr;                    /*(long) base address of page*/
  490. };
  491. typedef struct VDPageInfo VDPageInfo;
  492.  
  493. typedef VDPageInfo *VDPgInfoPtr;
  494.  
  495. struct VDSizeInfo {
  496.     short                            csHSize;                    /*(word) desired/returned h size*/
  497.     short                            csHPos;                        /*(word) desired/returned h position*/
  498.     short                            csVSize;                    /*(word) desired/returned v size*/
  499.     short                            csVPos;                        /*(word) desired/returned v position*/
  500. };
  501. typedef struct VDSizeInfo VDSizeInfo;
  502.  
  503. typedef VDSizeInfo *VDSzInfoPtr;
  504.  
  505. struct VDSettings {
  506.     short                            csParamCnt;                    /*(word) number of params*/
  507.     short                            csBrightMax;                /*(word) max brightness*/
  508.     short                            csBrightDef;                /*(word) default brightness*/
  509.     short                            csBrightVal;                /*(word) current brightness*/
  510.     short                            csCntrstMax;                /*(word) max contrast*/
  511.     short                            csCntrstDef;                /*(word) default contrast*/
  512.     short                            csCntrstVal;                /*(word) current contrast*/
  513.     short                            csTintMax;                    /*(word) max tint*/
  514.     short                            csTintDef;                    /*(word) default tint*/
  515.     short                            csTintVal;                    /*(word) current tint*/
  516.     short                            csHueMax;                    /*(word) max hue*/
  517.     short                            csHueDef;                    /*(word) default hue*/
  518.     short                            csHueVal;                    /*(word) current hue*/
  519.     short                            csHorizDef;                    /*(word) default horizontal*/
  520.     short                            csHorizVal;                    /*(word) current horizontal*/
  521.     short                            csHorizMax;                    /*(word) max horizontal*/
  522.     short                            csVertDef;                    /*(word) default vertical*/
  523.     short                            csVertVal;                    /*(word) current vertical*/
  524.     short                            csVertMax;                    /*(word) max vertical*/
  525. };
  526. typedef struct VDSettings VDSettings;
  527.  
  528. typedef VDSettings *VDSettingsPtr;
  529.  
  530. struct VDDefMode {
  531.     UInt8                            csID;
  532.     SInt8                            filler;
  533. };
  534. typedef struct VDDefMode VDDefMode;
  535.  
  536. typedef VDDefMode *VDDefModePtr;
  537.  
  538. struct VDSyncInfoRec {
  539.     UInt8                            csMode;
  540.     UInt8                            csFlags;
  541. };
  542. typedef struct VDSyncInfoRec VDSyncInfoRec;
  543.  
  544. typedef VDSyncInfoRec *VDSyncInfoPtr;
  545.  
  546.  
  547. #if PRAGMA_IMPORT_SUPPORTED
  548. #pragma import off
  549. #endif
  550.  
  551. #if PRAGMA_ALIGN_SUPPORTED
  552. #pragma options align=reset
  553. #endif
  554.  
  555. #ifdef __cplusplus
  556. }
  557. #endif
  558.  
  559. #endif /* __VIDEO__ */
  560.